﻿<%@ Import Namespace="UDS.Components" %>
<%@ Import Namespace="System.Data.SqlClient" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="pragma" content="no-cache" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="zh-cn" />
<meta name="author" content="Herry" />
<meta name="Copyright" content="Copyright (c) 2009 himm.cn" />
<title>Office Automation</title>
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<link rel="stylesheet" type="text/css" href="/css/header.css" media="screen" />

<script language="javascript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);

}

//function getSubmodule(){
//	SubmoduleCon.innerHTML=Submodule.xml;
//}

function ShowModuleView(ModuleID){
	top.main.location="ModuleView.asp?ModuleID="+ ModuleID +"";
}

function ComfirmExit(action){
	if(action==1)
	{
		myconfirm = confirm("确实要关闭窗口,退出文档一体化系统吗？");
		if (myconfirm==true){
			top.location.href="../SubModule/Login/logout.aspx?Action=1";
		}
	}
	if(action==2)
	{
		myconfirm = confirm("确实要重新登陆吗？");
		if (myconfirm==true){
			top.location.href="../SubModule/Login/logout.aspx?Action=2";
		}
		
	}
}
function GetLink()
{
	var str = Head.txtKey.value;
	if(str!="")
	{
		if(Head.txtKey.value.length==1)
		{		
			if((str.toUpperCase()<="Z"&&str.toUpperCase()>="A")||(str.toUpperCase()<="9"&&str.toUpperCase()>="0"))
				alert("不能查询单个字符！");
			else
				top.main.MainFrame.location= "../SubModule/Query/Listview.aspx?Key=" + Head.txtKey.value + "&amp;Range=15&amp;SearchType=3";				
		}
		else
		{
			top.main.MainFrame.location= "../SubModule/Query/Listview.aspx?Key=" + Head.txtKey.value + "&amp;Range=15&amp;SearchType=3";
		}
	}
	else
		alert("请输入查询关键字！");
}


		//获取时间
function Timer(span)
{
	var tmp = new Date();
	var milsecs=Date.parse(tmp.getMonth()+"-"+tmp.getDay()+"-"+tmp.getFullYear()+" "+document.getElementById('lbl_Hour').innerText+":"+document.getElementById('lbl_Minute').innerText+":"+document.getElementById('lbl_Second').innerText);
	var timer = new Date(milsecs+span);
	var seconds,minutes,hours,date;
	if(timer.getSeconds()<10)
		seconds = "0"+timer.getSeconds();
	else
		seconds = timer.getSeconds();
	if(timer.getMinutes()<10)
		minutes = "0"+timer.getMinutes();
	else
		minutes = timer.getMinutes();
	if(timer.getHours()<10)
		hours = "0"+timer.getHours();
	else
		hours = timer.getHours();	
		date=timer.getDate();
	document.getElementById('lbl_Second').innerText = seconds;
	document.getElementById('lbl_Minute').innerText = minutes;
	document.getElementById('lbl_Hour').innerText = hours;
	}
//得到服务器时间每隔updatespan分钟校验一次，每秒更新一次本地时钟
function GetServerTime(updatespan)
{	
	var clientspan = 1*1000;
	//更新本地时钟
	setInterval("Timer("+clientspan+")",clientspan);
	//同步服务器时钟
	setInterval("window.location.href='ControlHeader.aspx'",updatespan);
	
}
//-->
		</script>
		<script language="C#" runat="server">
		
		private void Page_Load(){
		
		BBSClass bbsclass = new BBSClass();
			//显示系统公告
			
			SqlDataReader dr_sysbulletin = bbsclass.GetDeskTopBulletin();
			string innerstring = "";
			while(dr_sysbulletin.Read())
			{
				innerstring += "<a href='/SubModule/UnitiveDocument/BBS/Display.aspx?BoardID="+dr_sysbulletin["board_id"].ToString()+"&ItemID="+dr_sysbulletin["item_id"].ToString()+"' target='_blank' title='"+dr_sysbulletin["content"].ToString()+"'>" + dr_sysbulletin["title"].ToString() + "</a></font>";
			}
			sys_bulletin.InnerHtml = innerstring;
		
				lbl_Hour.Text = DateTime.Now.Hour.ToString();
				lbl_Minute.Text = DateTime.Now.Minute.ToString();
				lbl_Second.Text = DateTime.Now.Second.ToString();
				lbl_year.Text=DateTime.Now.Date.Year.ToString();
				lbl_month.Text=DateTime.Now.Date.Month.ToString();
				lbl_day.Text=DateTime.Now.Date.Day.ToString();}
													
				
		string GetTime(object day)
		{
			if(day.ToString()=="")
				return "";
			else
			{
				return(DateTime.Parse(day.ToString()).ToShortTimeString());			
			}
		
		}
				
		</script>
</head>
<body onload="GetServerTime(15*60*1000)">
<script language="JavaScript">
function intPage(ParentNameStr){
	var myParentStr = "";
	myParentStr = parent.parent.location;
	myParentStr = myParentStr.toString();
	if (ParentNameStr.toLowerCase()==myParentStr.toLowerCase()){
	
	}else{
		ControlBar.style.visibility='hidden';
	}
}

function InfraUp(){
	parent.parent.UpFrame.rows="0,*"
}

function InfraDown(){
	parent.parent.UpFrame.rows="60,*"
}

function InfraLeft(c){
	var w,l;
	w = parent.parent.main.thisFrame.cols;
	l = w.substr(0,w.indexOf(","))	
	if(l==0)
	{
		Head.imgTreeStatus.src = "../Images/opentree.gif"		
		c.innerText = "关闭目录"
	}
	else
	{
		Head.imgTreeStatus.src = "../Images/closetree.gif"		
		c.innerText = "打开目录"
	}
	parent.parent.main.thisFrame.cols =  (180-l) +",*"
	
	
}

function InfraRight(){
	parent.parent.main.thisFrame.cols="180,*"
}

function InfraDefault(){
	parent.parent.UpFrame.rows="60,*"
	parent.parent.LeftFrame.cols="180,*";
}

function InfraMax(){
	parent.parent.UpFrame.rows="0,*"
	parent.parent.LeftFrame.cols="0,*";
}
function changeuser()
{
	var newdialoguewin = window.showModalDialog("../SubModule/Login/Index.aspx",window,"dialogWidth:600px;DialogHeight=490px;status:no");
	if(newdialoguewin!=null){}
}

</script>
<form name="Head">
<div>
    <h1><a class="logo" href="/SubModule/UnitiveDocument/" target="main" title="返回我的桌面"><span>我的桌面</span></a></h1>
    <div class="t_r">
    <p><a href="/SubModule/UnitiveDocument/Index.aspx" target="main">我的桌面</a> | <a href="/SubModule/WorkAttendance/Default.aspx" target="MainFrame">考勤</a> | <a href="/SubModule/UnitiveDocument/Setup/MySetup.aspx" target="MainFrame">密码</a> | <a onclick="ComfirmExit(2)" href="#" target="_self">重新登陆</a> | <a onclick="ComfirmExit(1)" href="#" target="_self">退出</a></p>

    </div>
    <div class="datatime">
        您好，祝您工作愉快！<span><asp:label id="lbl_year" runat="server">Label</asp:label>年<asp:label id="lbl_month" runat="server">Label</asp:label>月<asp:label id="lbl_day" runat="server">Label</asp:label>日<asp:label id="lbl_Hour" runat="server"></asp:label>:<asp:label id="lbl_Minute" runat="server"></asp:label>:<asp:label id="lbl_Second" runat="server"></asp:label></span>
    </div>
    <div class="search">
    <p><a href="/SubModule/Query/Google.aspx" target="MainFrame">全文检索</a>&nbsp;<input id="txtKey" onKeyDown="if(event.keyCode == 13) { GetLink();}" type="text" name="txtKey" height="12px"><a style=" cursor:pointer;" onClick="GetLink()" target="Main"><img id="IMG1" height="24" src="/images/Udssearchbutton.gif" width="26" border="0"></a></p>
    </div>
    <p><marquee id="sys_bulletin" onMouseOver="this.stop()" onMouseOut="this.start();" scrollAmount="5" direction="left" behavior="scroll" loop="0" runat="server"></marquee></p>
	</div>
	
</div>

</form>
</body>
</html>